package com.czr.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * <p>
 * 用户标
 * </p>
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("czr_user")
@ApiModel(value="czr_user对象", description="用户表")
public class CzrUserVo extends Model<CzrUserVo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @NotEmpty(message = "id不能为空！")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "密码")
    @NotEmpty(message = "新密码不能为空！")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "密码")
    @NotEmpty(message = "旧密码不能为空！")
    private String oldPassword;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
